In recent years, an imaging device has been provided with a function not only for recording imaging data on a recording medium, but also for transferring imaging data that has been in progress of imaging or been imaged to a server or the like via a network. Further, such a technology is disclosed that, regarding an electronic device having a communication function, connection to a network is easy and unintended connection is not implemented. For example, in Patent Literature 1, the use of a wireless-communication interface is controlled depending on whether or not a wired cable is connected to a wired-communication interface.